<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.min.css"/>
    <script src="${pageContext.request.contextPath}/static/js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/static/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/static/echars/echarts.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<%--<table style="border: 1px;"></table>--%>
<br>
<div class="form-group" style="width: 70%;height: 600px;">
    <div id="main" style="width: 100%;height: 100%;"></div>
</div>
<script type="text/javascript">
    let order=${orders};

    /**
     * 统计图
     * rechargerecord表
     * 近一年消费统计图（price【字段名】，createdTime【字段名】）
     * */
    var myChar = echarts.init(document.getElementById("main"));
    var option = {
        title: {
            text: '近一年消费统计'
        },
        tooltip: {
            trigger: 'axis'
        },
        xAxis: {
            type: 'category',
            data: [1,2,3,4,5,6,7,8,9,10,11,12]
        },
        yAxis: {
            type: 'value'
        },
        series: [{
            name: '会员统计',
            type: 'line',
            data: [order[1],order[2],order[3],order[4],order[5],order[6],order[7],order[8],order[9],order[10],order[11],order[12]]
        }]
    };
    myChar.setOption(option);
</script>
</body>
</html>
